package org.example.main.multi_threading;

import org.example.domain.Person;
import org.example.main.multi_threading.domain.Station;
import org.example.service.TestService;
import org.example.utils.JsonResult;

/**
 * @Author: WangShengJie
 * @Date: 2025/6/1
 */
public class ImplementRunnableDemo {

    public static void main(String[] args) {
        /**
         * 匿名内部了写法
         */
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("实现Runnable方法！！！");
            }
        });
        thread.start();

        TestService testService = new TestService() {
            @Override
            public JsonResult methodListenerTest(Person person) {
                return null;
            }

            @Override
            public String nullDemo(String name) {
                return null;
            }
        };

        Station station = new Station() {
            @Override
            public void run() {
                super.run();
            }
        };
    }
}
